import { request } from '@/utils/request'

// 登录的接口封装
// export const loginRequest = (url: string, method: string, obj: any) => {
export const loginRequest = (obj: any) => {
  return request('/login/password', 'POST', obj)
}

// 发送验证码的请求
export const getCodeRequest = (obj: any) => {
  return request('/code', 'GET', obj)
}

// 手机号+验证码的登录
export const loginByCodeRequest = (obj: any) => {
  return request('/login', 'POST', obj)
}

// 获取个人用户信息
export const getUserInfoRequest = () => {
  // 这里只需要传递2个参数，所以还需要再回到request封装里面 去修改封装的函数
  return request('/patient/myUser', 'GET')
}
